package com.banciyuan.bcywebview.biz.topic;

/**
 * Created by squall on 2015/8/17.
 */
public class TopicTypeFactory {
    public final static int TYPE_COSILL = 0;
    public final static int TYPE_WRITE = 1;
    public final static int TYPE_DAILY = 2;
    public final static int TYPE_USER_WRITE = 3;
    public final static int TYPE_GROUP = 4;
    public final static int TYPE_USER_OTHER = 5;
    public final static int Type_GROUP_POST = 6;
    public final static int TYPE_CIRCLE = 7;
    public final static int TYPE_GOODS = 8;
    public final static int TYPE_ARTICLE = 9;
    public final static int TYPE_VIDEO = 10;

    public static int getTopicType(String type, String subType) {
        if (type.equals("group")) {
            return TYPE_GROUP;
        } else if (type.equals("group_post")) {
            return Type_GROUP_POST;
        } else if (type.equals("cos")) {
            return TYPE_COSILL;
        } else if (type.equals("illust")) {
            return TYPE_COSILL;
        } else if (type.equals("novel")) {
            return TYPE_WRITE;
        } else if (type.equals("daily")) {
            if (subType.equals("larticle")) {
                return TYPE_ARTICLE;
            } else if (subType.equals("svideo")) {
                return TYPE_VIDEO;
            } else {
                return TYPE_DAILY;
            }
        } else if (type.equals("circle")) {
            return TYPE_CIRCLE;
        } else if (type.equals("user")) {
            if (subType.equals("writer")) {
                return TYPE_USER_WRITE;
            } else if (subType.equals("coser") || subType.equals("drawer")) {
                return TYPE_USER_OTHER;
            } else {
                return -1;
            }
        } else if (type.equals("zhipin")) {
            return TYPE_GOODS;
        } else {
            return -1;
        }
    }

}
